@@ -19,7 +19,7 @@ app.on('window-all-closed', function() {
|
||
| 19 | 19 |
app.on('ready', function() {
|
| 20 | 20 |
// Create the browser window. |
| 21 | 21 |
mainWindow = new BrowserWindow({
|
| 22 |
- width: 900, |
|
| 22 |
+ width: 1000, |
|
| 23 | 23 |
height: 700, |
| 24 | 24 |
'min-width': 500, |
| 25 | 25 |
'min-height': 200, |
@@ -12,7 +12,7 @@ angular.module('codexApp.note', [])
|
||
| 12 | 12 |
|
| 13 | 13 |
var marked = require('marked');
|
| 14 | 14 |
var filesystem = require("fs");
|
| 15 |
- |
|
| 15 |
+ |
|
| 16 | 16 |
console.log('Note opened!')
|
| 17 | 17 |
|
| 18 | 18 |
$scope.note = FileService.getCurrentNote(); |
@@ -30,6 +30,22 @@ angular.module('codexApp.note', [])
|
||
| 30 | 30 |
$scope.note.data = marked(str); |
| 31 | 31 |
} |
| 32 | 32 |
//console.log($scope.note); |
| 33 |
+ var a = document.getElementsByTagName('a'), ajax;
|
|
| 34 |
+ for (var i=0; i<a.length; ++i) {
|
|
| 35 |
+ a[i].addEventListener('click', handleAnchor, false);
|
|
| 36 |
+ } |
|
| 37 |
+ function handleAnchor(e){
|
|
| 38 |
+ e.preventDefault(); |
|
| 39 |
+ if(ajax) ajax.abort(); |
|
| 40 |
+ ajax = new XMLHttpRequest(); |
|
| 41 |
+ ajax.onload = updateContent; |
|
| 42 |
+ ajax.open("get", this.href, true);
|
|
| 43 |
+ ajax.send(); |
|
| 44 |
+ console.log("-> Prevented link from opening: " + e.srcElement.href);
|
|
| 45 |
+ } |
|
| 46 |
+ function updateContent() {
|
|
| 47 |
+ // Do something with `this.responseText` |
|
| 48 |
+ } |
|
| 33 | 49 |
}); |
| 34 | 50 |
|
| 35 | 51 |
}]); |
@@ -47,7 +47,10 @@ angular.module('codexApp')
|
||
| 47 | 47 |
if (stat && stat.isDirectory()) {
|
| 48 | 48 |
results = results.concat(directorySize(file_path)) |
| 49 | 49 |
} else {
|
| 50 |
+ if(file != ".DS_Store") {
|
|
| 50 | 51 |
size = size + stat["size"]; |
| 52 |
+ console.log("* " + stat["size"] + " KB -> " + file_path)
|
|
| 53 |
+ } |
|
| 51 | 54 |
} |
| 52 | 55 |
}); |
| 53 | 56 |
return size; |
@@ -0,0 +1,3 @@ |
||
| 1 |
+<div class="note-container"> |
|
| 2 |
+ <div class="note" ng-bind-html="note.data"></div> |
|
| 3 |
+</div> |
@@ -1,3 +1,8 @@ |
||
| 1 | 1 |
# Test #0001 |
| 2 | 2 |
|
| 3 | 3 |
Testing the codex app note structure. |
| 4 |
+ |
|
| 5 |
+## Some Links |
|
| 6 |
+ |
|
| 7 |
+* [External Link](http://blog.j1x.co) |
|
| 8 |
+* [Another note](Test-0002/index.md) |